export default {
  config: [
    {
      name: '默认配置',
      code: 'scatterDefault',
      children: [
        {
          name: '默认图标',
          code: 'defalutIcon',
          type: 'ImgUpdate',
        },
        {
          name: '高亮图标',
          code: 'highlighIcon',
          type: 'ImgUpdate',
        },
        {
          name: '图标比例',
          code: 'iconSize',
          min: 0,
          step: 0.01,
          value: 0.25,
          type: 'InputNumber',
          unit: '比例',
        },
        {
          name: '描述文字颜色',
          code: 'unClusterIconTextColor',
          type: 'ColorSelector',
          value: 'rgba(6,10,25,0.85)',
        },
        {
          name: '描述文字大小',
          code: 'unClusterIconTextSize',
          value: 12,
          min: 0,
          type: 'InputNumber',
          unit: 'px',
        },
      ],
    },
    {
      name: '聚合设置',
      code: 'cluster',
      children: [
        {
          name: '是否使用聚合',
          code: 'useCluster',
          type: 'ChangeConfig',
          value: {
            type: false,
            clusterCircleRadius: 18,
            clusterCircleColor: '#00B9E1',
            clusterTextSize: 16,
            clusterTextColor: '#FFFFFF',
            clusterCircleStrokeColor: '#00B9E1',
            clusterCircleStrokeWidth: 8,
            clusterCircleStrokeOpacity: 0.33,
            clusterRadius: 100,
          },
          enumValue: [
            {
              key: '是',
              value: true,
              change: [
                {
                  name: '聚合点位半径',
                  code: 'clusterCircleRadius',
                  min: 0,
                  type: 'InputNumber',
                  unit: '半径',
                },
                {
                  name: '聚合点位颜色',
                  code: 'clusterCircleColor',
                  type: 'ColorSelector',
                },
                {
                  name: '聚合边框颜色',
                  code: 'clusterCircleStrokeColor',
                  type: 'ColorSelector',
                },
                {
                  name: '聚合边框宽度',
                  code: 'clusterCircleStrokeWidth',
                  min: 0,
                  type: 'InputNumber',
                  unit: 'px',
                },
                {
                  name: '聚合边框透明度',
                  code: 'clusterCircleStrokeOpacity',
                  min: 0,
                  step: 0.01,
                  max: 1,
                  type: 'InputNumber',
                  unit: 'px',
                },
                {
                  name: '聚合文字大小',
                  code: 'clusterTextSize',
                  min: 0,
                  type: 'InputNumber',
                  unit: 'px',
                },
                {
                  name: '聚合文字颜色',
                  code: 'clusterTextColor',
                  type: 'ColorSelector',
                },
                {
                  name: '聚合范围',
                  code: 'clusterRadius',
                  min: 0,
                  type: 'InputNumber',
                },
              ],
            },
            {
              key: '否',
              value: false,
            },
          ],
        },
      ],
    },
    {
      name: '弹框设置',
      code: 'tooltip',
      children: [
        {
          code: 'tooltipShow',
          value: 'hover',
          type: 'Radio',
          enumValue: [
            {
              key: '无弹框',
              value: 'hide',
            },
            {
              key: '鼠标划过弹框',
              value: 'hover',
            },
            {
              key: '点击提示弹框',
              value: 'click',
            },
          ],
        },
        {
          name: '宽度设置',
          code: 'windowWidth',
          value: 300,
          type: 'InputNumber',
          unit: 'px',
        },
        {
          name: '高度设置',
          code: 'windowHeight',
          value: 200,
          type: 'InputNumber',
          unit: 'px',
        },
        {
          name: '边框粗细',
          code: 'borderWidth',
          min: 0,
          value: 3,
          type: 'InputNumber',
          unit: 'px',
        },
        {
          name: '边框颜色',
          code: 'borderColor',
          value: '#3399CC',
          type: 'ColorSelector',
        },
        {
          name: '背景来源',
          code: 'background',
          type: 'ChangeConfig',
          value: {
            type: 'color',
            backgroundColor: '#369',
            imageUrl: '',
          },
          enumValue: [
            {
              key: '颜色背景',
              value: 'color',
              change: [
                {
                  name: '背景颜色设置',
                  code: 'backgroundColor',
                  type: 'ColorSelector',
                },
              ],
            },
            {
              key: '图片背景',
              value: 'image',
              change: [
                {
                  name: '背景图片地址',
                  code: 'imageUrl',
                  type: 'ImgUpdate',
                },
              ],
            },
          ],
        },
      ],
    },
    {
      name: '高亮点位',
      code: 'highlightMarker',
      type: 'Input',
      value: 'ons_light|5001',
    },
  ],
  data: {
    field: [
      { name: 'id', mapper: 'id' },
      { name: 'lng', mapper: 'longitude' },
      { name: 'lat', mapper: 'latitude' },
      { name: 'text', mapper: 'senseName', optional: true },
      { name: 'url', mapper: 'url', optional: true },
    ],
    type: 1,
    value: JSON.stringify([
      {
        id: 'ons_light|5001',
        longitude: 113.273556,
        latitude: 40.051156,
        senseName: '十四校西侧站点灯杆',
        url: 'https://icity.jd.com',
      },
      {
        id: 'ons_light|5002',
        longitude: 113.269238,
        latitude: 40.055743,
        senseName: '魏都新城C区南站点灯杆',
        url: '',
      },
      {
        id: 'ons_light|5003',
        longitude: 113.282602,
        latitude: 40.053042,
        senseName: '魏都大道源茂街交叉口东站点灯杆',
        url: '',
      },
    ]),
  },
  events: {
    click: {
      description: '散点响应事件',
      fields: {
        lng: {
          mapper: '',
          description: '经度',
        },
        lat: {
          mapper: '',
          description: '纬度',
        },
        id: {
          mapper: '',
          description: 'id',
        },
      },
    },
  },
  height: 0,
  width: 0,
  coordinate: { y: 0, x: 0 },
  name: '散点层',
  code: 'EScatter',
  version: '1.0.0',
};
